<?php
$permissions = isset($member['permissions']) ? $member['permissions'] : Array();
?>
<nav class="sider-nav" role="sider-navigation">
    <ul>
<?php
$ctl = $routers['controller'];
$act = $routers['action'];
if ($ctl == 'tests') {
?>
       <li><?php echo $this->Html->link(__('List Tests', true), array('controller'=>'tests', 'action'=>'index')); ?></li>
       <li><?php echo $this->Html->link(__('Make Papers', true), array('controller'=>'tests', 'action'=>'make')); ?></li>
       <li><?php echo $this->Html->link(__('Review Tests', true), array('controller'=>'tests', 'action'=>'review')); ?></li>
       <li><?php echo $this->Html->link(__('Add Test', true), array('controller'=>'tests', 'action'=>'post')); ?></li>
<?php }
if (in_array($ctl, array('users', 'roles')) && !in_array($act, array('login'))) {
?>

       <li><?php echo $this->Html->link(__('List Roles', true), array('controller'=>'roles', 'action'=>'index')); ?></li>
       <li><?php echo $this->Html->link(__('New Role', true), array('controller'=>'roles', 'action'=>'new')); ?></li>
       <li><?php echo $this->Html->link(__('List Users', true), array('controller'=>'users', 'action'=>'index')); ?></li>
       <li><?php echo $this->Html->link(__('New User', true), array('controller'=>'users', 'action'=>'new')); ?></li>
<?php } ?>
    </ul>
</nav>